package cn.wolfcode.luowowo.member.mapper;

import cn.wolfcode.luowowo.member.domain.UserInfo;
import cn.wolfcode.luowowo.member.vo.UserCommentVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserInfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserInfo record);

    UserInfo selectByPrimaryKey(Long id);

    List<UserInfo> selectAll();

    int updateByPrimaryKey(UserInfo record);

    int selectCountByPhone(String phone);

    UserInfo selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    void updateUserInfo(UserInfo userInfo);

    UserInfo selectUserByPhone(String phone);

    void updatePassword(@Param("id") Long id, @Param("password") String password);

    String queryByUserIdForFollow(Long id);

    UserInfo selectUserByEmail(String email);

    int selectCountByEmail(String email);

    void updateTemporaryEmailById(@Param("email") String email, @Param("id") Long id);

    UserInfo selectUserByTemporaryEmail(String temporaryEmail);

    void updateEmail(@Param("id") Long id, @Param("temporaryEmail") String temporaryEmail);

    void updateTemporaryPhoneById(@Param("phone") String phone, @Param("id") Long id);

    UserInfo selectUserByTemporaryPhone(String temporaryPhone);

    void updatePhone(@Param("id") Long id, @Param("temporaryPhone") String temporaryPhone);

    UserInfo selectByUid(Long uid);

    List<UserInfo> selectByUser();

    void updateStatisByVo(UserCommentVO vo1);
}